package org.gesplan.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author David
 */
@Entity
@Table(name = "rpt_staff_hours")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "RptStaffHours.findAll", query = "SELECT r FROM RptStaffHours r"),
    @NamedQuery(name = "RptStaffHours.findByStaffId", query = "SELECT r FROM RptStaffHours r WHERE r.staffId = :staffId"),
    @NamedQuery(name = "RptStaffHours.findByDateStart", query = "SELECT r FROM RptStaffHours r WHERE r.dateStart = :dateStart"),
    @NamedQuery(name = "RptStaffHours.findByDateEnd", query = "SELECT r FROM RptStaffHours r WHERE r.dateEnd = :dateEnd")
})
public class RptStaffHours implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @JoinColumn(name = "staff_id", referencedColumnName = "id")
    @ManyToOne
    private Staff staffId;
    @Basic(optional = false)
    @Column(name = "date_start")
    private String dateStart;
    @Basic(optional = false)
    @Column(name = "date_end")
    private String dateEnd;
    @Column(name = "worked")
    private float worked;
    @Column(name = "extra_to_charge")
    private float extraToCharge;    
    @Column(name = "extra_to_recover")
    private float extraToRecover;
    @Column(name = "extra_recovered")
    private float extraRecovered;    
    @Column(name = "vacation")
    private float vacation;
    @Column(name = "disable")
    private float disable;
    @Column(name = "syndicate")
    private float syndicate;
    @Column(name = "formation")
    private float formation;    


    public RptStaffHours() { }


    public RptStaffHours(Staff staffId) {
        this.staffId = staffId;
    }


    public RptStaffHours(Staff staffId, String dateStart, String dateEnd) {
        this.staffId = staffId;
        this.dateStart = dateStart;
        this.dateEnd = dateEnd;
    }


    public Staff getStaffId() {
        return staffId;
    }

    public void setStaffId(Staff staffId) {
        this.staffId = staffId;
    }


    public String getDateStart() {
        return dateStart;
    }


    public void setDateStart(String dateStart) {
        this.dateStart = dateStart;
    }


    public String getDateEnd() {
        return dateEnd;
    }


    public void setDateEnd(String dateEnd) {
        this.dateEnd = dateEnd;
    }


    public float getWorked() {
        return worked;
    }


    public void setWorked(float worked) {
        this.worked = worked;
    }


    public float getExtraRecovered() {
        return extraRecovered;
    }


    public void setExtraRecovered(float extraRecovered) {
        this.extraRecovered = extraRecovered;
    }

    
    public float getextraToRecover() {
        return extraToRecover;
    }


    public void setExtraToRecover(float extraToRecover) {
        this.extraToRecover = extraToRecover;
    }
    
    public float getExtraToCharge() {
        return extraToCharge;
    }


    public void setExtraToCharge(float extraToCharge) {
        this.extraToCharge = extraToCharge;
    }
    

    public float getVacation() {
        return vacation;
    }


    public void setVacation(float vacation) {
        this.vacation = vacation;
    }


    public float getDisable() {
        return disable;
    }


    public void setDisable(float disable) {
        this.disable = disable;
    }


    public float getSyndicate() {
        return syndicate;
    }


    public void setSyndicate(float syndicate) {
        this.syndicate = syndicate;
    }
    

    public float getFormation() {
	return formation;
    }


    public void setFormation(float formation) {
	this.formation = formation;
    }    


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (staffId != null ? staffId.hashCode() : 0);
        return hash;
    }


    @Override
    public boolean equals(Object object) {
        if (!(object instanceof RptStaffHours)) {
            return false;
        }
        RptStaffHours other = (RptStaffHours) object;
        return (this.staffId != null || other.staffId == null) && (this.staffId == null || this.staffId.equals(other.staffId));
    }


    @Override
    public String toString() {
        return "";
    }
    
    
}